import { Component,Input } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { TopicInfo } from "../../models/quesinfo";

/**
 * Generated class for the QuestionScorePage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */


@Component({
  selector: 'page-question-score',
  templateUrl: 'question-score.html',
})
export class QuestionScorePage {
  @Input() topic:TopicInfo;
  @Input() poneSet: Array<any>;
  @Input() topicIndex;
  topicIndexshow;
  max;
  firsttitle;
  lasttitle;

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }
  ngOnInit(): void  {
    this.topicIndexshow=this.topicIndex+1;
    this.max=this.topic.listColumn.length;
    this.firsttitle=this.topic.listColumn[0].FCOptionContent;
    this.lasttitle=this.topic.listColumn[this.topic.listColumn.length-1].FCOptionContent;
    //console.log(this.topic)
  }
}
